/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:53:23
 *
 * 学科有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */



import {createAPI} from "@/utils/request";

// 获取学科
export const subjectsList = data => createAPI("/subjects/simple", "get",data);
// 获取目录下拉框
export const directoryName = data => createAPI("/directorys", "post", data);
export const update = data =>
  createAPI(`/companys/${data.id}`, "PUT", data);
export const remove = data => createAPI(`/companys/${data.id}`, "DELETE");
export const detail = data =>
  createAPI(`/companys/${data.id}`, "get");
export const disabled = data => createAPI(`/companys/${data.id}/${data.state}`, "post");

// 获取学科列表
export const getSubList = data => createAPI('/subjects', 'get', data)
// 新增学科
export const addSub = data => createAPI('/subjects', 'post', data)
// 修改学科
export const editSub = data =>
  createAPI(`/subjects/${data.id}`, 'PUT', data)
// 删除学科
export const delSub = id => createAPI(`/subjects/${id}`, 'DELETE')

// 获取学科详情
export const getSub = id =>
  createAPI(`/subjects/${id}`, 'get')

